<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>${bookTemp.bookInfoBean.bookName }</title>
<%@include file="../include/includecss.jsp"%>
</head>
<body>
	<%@include file="../include/includemenu.jsp"%>
	<%@include file="../include/includesearch.jsp"%>
	<div class="container theme-showcase container-fixed-top" role="main">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h3 class="panel-title">书籍：${bookTemp.bookInfoBean.bookName }</h3>
			</div>
			<div class="panel-body">
				<div class="row">
					<div class="col-sm-3">
						<img
							src="${pageContext.request.contextPath}/pic/${bookTemp.bookInfoBean.bookID }.jpg"
							width="200px" height="200px" />
					</div>
					<div class="col-sm-9">
						<div class="row">
							<div class="col-sm-2 text-right">书&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名:</div>
							<div class="col-sm-8 text-left">${bookTemp.bookInfoBean.bookName }</div>
						</div>
						<div class="row">
							<div class="col-sm-2 text-right">作&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;者:</div>
							<div class="col-sm-10 text-left">${bookTemp.bookDetialBean.bookAuthor }</div>
						</div>
						<div class="row">
							<div class="col-sm-2 text-right">出&nbsp;版&nbsp; 社:</div>
							<div class="col-sm-10 text-left">${bookTemp.bookDetialBean.bookPub }</div>
						</div>
						<div class="row">
							<div class="col-sm-2 text-right">出版时间:</div>
							<div class="col-sm-10 text-left">${bookTemp.bookDetialBean.bookPubDate }</div>
						</div>

						<div class="row">
							<div class="col-sm-2 text-right">页&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;数:</div>
							<div class="col-sm-10 text-left">${bookTemp.bookDetialBean.bookPage }</div>
						</div>
						<div class="row">
							<div class="col-sm-2 text-right">I &nbsp;S&nbsp;B &nbsp;N:</div>
							<div class="col-sm-10 text-left">${bookTemp.bookDetialBean.bookISBN }</div>
						</div>
						<div class="row">
							<div class="col-sm-2 text-right">添加日期:</div>
							<div class="col-sm-10 text-left">${bookTemp.bookDetialBean.bookAddDate }</div>
						</div>
						<div class="row">
							<div class="col-sm-2 text-right">分&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;类:</div>
							<div class="col-sm-10 text-left">${bookTemp.bookClassifyBean.bookClassifyName }</div>
						</div>


					</div>

				</div>
				<div class="row" style="margin-top: 30px;">
					<div class="col-sm-2">内容简介:</div>
					<div class="col-sm-8">&nbsp;</div>
				</div>
				<div class="row">
					<div class="col-sm-12 text-justify">
						<blockquote>
							<p style="word-wrap: break-word;">

								&nbsp;&nbsp;&nbsp;&nbsp;${bookTemp.bookDetialAddBean.bookContent }</p>
						</blockquote>
					</div>
				</div>
				<div class="row">
					<div class="col-sm-2">目&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;录:</div>
					<div class="col-sm-8">&nbsp;</div>
				</div>
				<div class="row">
					<div class="col-sm-12">
						<blockquote>
<p style="word-wrap: break-word;">
							&nbsp;&nbsp;&nbsp;&nbsp;${bookTemp.bookDetialAddBean.bookCatalogue }
							
					</p>		
							</blockquote>

					</div>
				</div>
			</div>
		</div>
		<div class="panel panel-default">
			<div class="panel-heading">
				<h3 class="panel-title">热门标签</h3>
			</div>
			<div class="panel-body">文学</div>
		</div>
		<div class="panel panel-default">
			<div class="panel-heading">
				<h3 class="panel-title">
					书评列表
					<c:if test="${user!=null }">
						<a
							href="${pageContext.request.contextPath}/addBookReview?bookid=${bookTemp.bookInfoBean.bookID }">添加</a>
					</c:if>
				</h3>
			</div>
			<div class="panel-body">
				<c:forEach items="${bookRevewByBookID}" var="bookReview">
					<div class="row">
						<div class="col-sm-4">时间：${bookReview.bookReviewsSimpleBean.bookReviewSimpleDate}</div>
						<div class="col-sm-4">
							<a
								href="${pageContext.request.contextPath}/BookReviewServlet?brvID=${bookReview.bookReviewsSimpleBean.bookReviewsSimple }">
								<c:choose>
									<c:when
										test="${fn:length(bookReview.bookReviewsSimpleBean.bookReviewSimpleTitle) > 20}">
										<c:out
											value="${fn:substring(bookReview.bookReviewsSimpleBean.bookReviewSimpleTitle, 0, 20)}..." />
									</c:when>
									<c:otherwise>
										<c:out
											value="${bookReview.bookReviewsSimpleBean.bookReviewSimpleTitle}" />
									</c:otherwise>
								</c:choose>
							</a>
						</div>
						<div class="col-sm-4">
							<c:choose>
								<c:when
									test="${fn:length(bookReview.bookReviewsDetialBean.bookReviewsDetialContent) > 20}">
									<c:out
										value="${fn:substring(bookReview.bookReviewsDetialBean.bookReviewsDetialContent, 0, 20)}..." />
								</c:when>
								<c:otherwise>
									<c:out
										value="${bookReview.bookReviewsDetialBean.bookReviewsDetialContent}" />
								</c:otherwise>
							</c:choose>
						</div>

					</div>
				</c:forEach>
			</div>
		</div>
	</div>

	<%@include file="../include/bottom.jsp"%>
</body>
</html>